
#ifndef GRAPH_H_
#define GRAPH_H_

#include <BitTools.h>
#include <stdio.h>
#include <string.h>

typedef struct _graph{
	long n;
	long long m;
	WORD** edges;
}Graph;

Graph* g;
WORD** gedges;
long gn;
long long gm;

#define hasEdge(i,j) setIsIn(gedges[i], j)
#define addEdge(i,j) setToSet(gedges[i], j); setToSet(gedges[j], i)
#define degree(i) setcount(dedges, 0, n)
#define neig(i) dedges[i]
#define removeEdge(i,j) setToCompl(gedges[j], i);setToCompl(gedges[i], j)

void setGraph(Graph* h);

Graph* getGraph();

Graph* homorphism(long *R, long r);

void readGraph(FILE* gfile);

#endif
